package health_system.health_system.entity;

import jakarta.persistence.*;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "moment_shares")
public class MomentShare extends BaseEntity {

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id", nullable = false)
    private User user;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "original_moment_id", nullable = false)
    private Moment originalMoment;
    
    @Size(max = 500)
    private String additionalComment;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "shared_as_moment_id")
    private Moment sharedAsMoment;
}